﻿using System.Text;

namespace DX.IO
{
    public static class FileEntryExtensions
    {
        public static string ReadAllText(this FileEntry fileEntry, Encoding encoding)
        {
            if (fileEntry == null) return string.Empty;
            var buffer = fileEntry.GetBuffer();
            return encoding.GetString(buffer);
        }
        public static string ReadAllText(this FileEntry fileEntry)
        {

            return fileEntry.ReadAllText(Encoding.UTF8);

        }
    }
}
